package com.vrp3d.common.enums;

import com.vrp3d.common.exceptions.CommonException;

/**
 * 展厅状态枚举
 *
 * @author vrp3d
 */
public enum ShowroomStatusEnum {

    /**
     * 展厅状态
     */
    DELETE("删除", 0),
    NORMAL("普通状态", 1),
    PENDING_REVIEW("待审核", 2),
    EXAMINATION_PASSED("审核通过", 3),
    AUDIT_NOT_PASSED("审核不通过", 4),
    ;

    private String description;
    private Integer msgInteger;

    public static ShowroomStatusEnum getShowroomStatusEnum(int code) {
        for (ShowroomStatusEnum showroomStatusEnum : ShowroomStatusEnum.values()) {
            if (code == showroomStatusEnum.getMsgInteger()) {
                return showroomStatusEnum;
            }
        }
        throw new CommonException(CommonExceptionEnum.REQUEST_PARAMETER_IS_EMPTY);
    }

    ShowroomStatusEnum(String description, Integer msgInteger) {
        this.description = description;
        this.msgInteger = msgInteger;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Integer getMsgInteger() {
        return msgInteger;
    }

    public void setMsgInteger(Integer msgInteger) {
        this.msgInteger = msgInteger;
    }
}
